package cn.cloudreal.cbms.medium.service.impl;

import java.util.List;

import cn.cloudreal.cbms.common.util.PageBean;
import cn.cloudreal.cbms.medium.dao.MediumDao;
import cn.cloudreal.cbms.medium.service.MediumService;
import cn.cloudreal.cbms.vo.Dictionary;
import cn.cloudreal.cbms.vo.Medium;
import cn.cloudreal.cbms.vo.ProjectMedium;

public class MediumServiceImpl implements MediumService
{
    private MediumDao mediumDao = null;

    public List<Medium> findMediumList(PageBean page, Medium medium)
    {
        return mediumDao.findMediumList(page, medium);
    }

    public void setMediumDao(MediumDao mediumDao)
    {
        this.mediumDao = mediumDao;
    }

    public void delMedium(int id)
    {
        mediumDao.delMedium(id);
    }

    public int addMedium(Medium medium)
    {
        return mediumDao.addMedium(medium);
    }

    public Medium findMediumById(int id)
    {
        // TODO Auto-generated method stub
        return mediumDao.findMediumById(id);
    }

    public int udpateMedium(Medium medium)
    {
        return mediumDao.udpateMedium(medium);
    }

    public List<Medium> findMediumByMediaID(int mediaID)
    {
        // TODO Auto-generated method stub
        return this.mediumDao.findMediumByMediaID(mediaID);
    }

    /**
     * 根据媒介编号查询媒介
     */
    public List<Medium> findMediumByMediumID(String mediumID){
        return mediumDao.findMediumByMediumID(mediumID);
    }
    
    public List findAllMedium(PageBean page, Medium medium,String key,String keySql){
        return mediumDao.findAllMedium(page, medium, key,keySql);
    }

    /**
     * 根据媒介名称查询媒介
     */
    public List<Medium> findMediumByMediumName(String mediumName)
    {
        // TODO Auto-generated method stub
        return mediumDao.findMediumByMediumName(mediumName);
    }

    public List<ProjectMedium> findProjectmediumByMediumId(int mediumId)
    {
        // TODO Auto-generated method stub
        return this.mediumDao.findProjectmediumByMediumId(mediumId);
    }
    
}
